/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package models;

import java.util.Date;
import javax.persistence.Entity;
import play.data.validation.Email;
import play.data.validation.MinSize;
import play.data.validation.Password;
import play.data.validation.Required;
import play.db.jpa.Model;

/**
 *
 * @author Luis
 */
@Entity
public class Usuario extends Model{
    @Email
    @Required
    @MinSize(5)
    public String correo;
    @Password
    @Required
    @MinSize(6)
    public String password;
    @Required
    public String nombre;
    @Required
    public String apellidoPaterno;
    public String apellidoMaterno;
    @Required
    public Date   fechaNacimiento;
    
    public String getNombreCompleto(){
        return nombre +" "+ apellidoPaterno + " "+ apellidoMaterno;
    }
    
}
